/* eslint-disable react/display-name */
import React from 'react';
import { Table, Button } from 'antd';

const dataSource = [
  {
    value: 'v1.0.0',
    label: '当前版本',
    key: 1
  },
  {
    value: 'react + ant design',
    label: '基于框架',
    key: 2
  },
  {
    value: 'tojustinzyh@163.com',
    label: '获取帮助',
    key: 3
  },
  {
    value: 'btn',
    label: '获取代码',
    key: 4
  }
];

const columns = [
  {
    title: 'label',
    dataIndex: 'label',
    align: 'center',
  },
  {
    title: 'value',
    dataIndex: 'value',
    render: text => text == 'btn' ? <Button size='small' type='primary'>立即下载</Button> : text,
  },
];
class Version extends React.Component {
  constructor(props) {
    super(props)
  }

  render() {
    return (
      <Table
        pagination={false}
        showHeader={false}
        bordered={true}
        dataSource={dataSource} columns={columns} />
    )
  }
}
export default Version
